<template>
	<jiess :setup="setup" />
</template>

<script setup>
	import { ElMain, ElFooter } from 'element-plus';
	import BaseLayout from './components/BaseLayout';
	import BaseRouter from './components/BaseRouter';
	import { APP_CONFIG } from '@/jiessConfig/consts';
	const { VITE_CONFIG_BASE } = import.meta.env;

	function setup() {
		this.add({
			is: BaseLayout,
			children: {
				class: 'text-center w-full pt-10vh',
				children: [{
						is: ElMain,
						children: {
							class: "w-full mx-auto",
							style: { maxWidth: '420px' },
							children: [{
								class: "text-3xl font-600 font-black pb-10",
								children: {
									class: "flex flex-nowrap justify-center w-full",
									children: [{
										is: 'img',
										alt: 'Jiess',
										class: 'w-36px mr-2',
										src: VITE_CONFIG_BASE + '/images/common/icon.png'
									}, APP_CONFIG.title]
								}
							}, { is: BaseRouter }]
						}
					},
					{
						is: ElFooter,
						children: ' Copyright © 2023 JIESS.NET ',
						style: {
							left: 0,
							right: 0,
							bottom: 0,
							textAlign: 'center',
							position: 'absolute',
						}
					}
				]
			}
		})
	}
</script>